package com.crazy.crazybusinessservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crazy.crazymodel.model.entity.BankCardWaterRecord;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface BankCardBalanceRecordService extends IService<BankCardWaterRecord> {
    /**
     * 添加银行卡流水
     * @param bankCardId 银行卡id
     * @param amount 操作金额
     * @param type  操作类型 0->进账 1->出账
     * @return
     */
    public String  addRecord(String bankCardId, BigDecimal amount,int type);

    /**
     * 按照银行卡号和时间范围进行流水查询
     * @param bankCardId 银行卡id
     * @param start 开始时间
     * @param end 截止时间
     * @return
     */
    public List<BankCardWaterRecord> selectByTime(String bankCardId, Date start, Date end );

    /**
     * 默认无截至时间的流水查询
     * @param bankCardId
     * @param start
     * @return
     */
    public List<BankCardWaterRecord> selectByTime(String bankCardId,Date start);
}
